public class Test13_join {
    public static void main(String[] args) throws InterruptedException {
        LifeCircle lc=new LifeCircle();
        System.out.println(lc.isAlive());//线程的状态值
        lc.start();
        System.out.println(lc.isAlive());
        lc.join();//TODO：让lc先运行完，在执行main
        System.out.println("让主程序的其他操作");
        System.out.println(lc.isAlive());
    }
}
class  LifeCircle extends Thread{
    public void run(){
        int i=0;
        while ((++i)<10){
            System.out.println("用户线程"+i+"此执行");
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
